var RunLayer2 = BaseLayer.extend({
	arr:null,
	scene:null,
	ctor:function (parent) {
		this._super(parent);
		this.init();
	},
	init:/**
			 * 初始化,
			 */
	function () {
		this._super();
		cc.log("RunLayer2初始化");
		
		// 天平
		this.balance = new Balance(this);
		this.balance.outFama();
		
		var beaker = new Beaker(this, 10, TAG_BEAKER, this.callback); 
		beaker.setPosition(cc.p(550, 140));
		beaker.upLineResult();
		
		// 物品库
		this.lib = new Lib(this);
		this.lib.init([TAG_LIB_IRON, TAG_LIB_BEAKER,TAG_LIB_FUNNEL,TAG_LIB_PAPER,TAG_LIB_ROD]);
	},
	callback:function (p){
		var func = cc.callFunc(this.actionDone, this);
		switch(p.getTag()){
		case TAG_BEAKER:
			this.beakerYinliu(p, TAG_BEAKER2);
			break;
		case TAG_ROD:
			this.doRod(p);
			break;
		}
	},
	actionDone:function(p){
		var func = cc.callFunc(this.actionDone, this);
		switch(p.getTag()){
		case TAG_ROD:
			this.showPaper2();
			break;
		}
	},
	doRod:/**
			 * 用玻璃棒靠三层滤纸
			 * 
			 * @param p
			 */
		function(p){
		var func = cc.callFunc(this.actionDone, this);
		var rotate = cc.rotateTo(0.3, 20);
		var move = cc.moveTo(0.7,cc.p(185,355));
		var delay = cc.delayTime(1);
		var seq = cc.sequence(rotate, move, func, delay, this.callNext);
		p.runAction(seq);
	},
	destroy:/**
			 * 销毁
			 */
	function(){
		this.lib.close();
		this._super();
	},
	onExit:function(){
		this._super();
	}
});